home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1997 February / EnigmA AMIGA RUN 15 (1997)(G.R. Edizioni)(IT)[!][issue 1997-02][PLANET CD V].iso / enigma / earcd / utility / utilcli / prmptpth.rdm < prev    next >
Text File  |  1997-01-18  |  1KB  |  29 lines

  1. Short:    Shortens shellprompts in a sensible way
  2. Author:   sysop@sweetdreams.lahn.de (Matthias Bethke)
  3. Uploader: sysop@sweetdreams.lahn.de (Matthias Bethke)
  4. Version:  37.2
  5. Type:     util/cli
  6. Requires: AmigaOS 2.04
  7.  
  8. If you have a lot of nested directories on your HD, shellprompts of the
  9. usual form "%n:%s>" become quite long, leaving little room on the
  10. commandline. This program can be inserted in the promt line and shortens
  11. the path in a more sensible way then the frequently suggested "echo `cd`
  12. len x". Besides it's shorter 'n faster :-) (can also be made resident)
  13. A path like
  14. Work:this/is/a/very/long/subdir/path
  15. will be shortened to
  16. Work://////path
  17. if it exceeds the desired promplength (one slash for every subdir plus the
  18. full name of the last component)
  19. To try it out, you can start it like any CLI program, as the only paramater
  20. it takes the desired length of the prompt. The last path component will
  21. always be displayed, even if the resulting string is longer than the number
  22. of characters you specified.
  23. To insert it in your prompt, use the following command in your
  24. shell-startup:
  25. prompt "%n:*`promptpath <length>*`>" (replacing <length> with a number of
  26. course)
  27. As the program is executed each time the shell displays a new prompt,
  28. making it resident is definitely a Good Thing(tm) :-)
  29.